package com.zline.foodraise.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by heshantao on 15/8/10.
 * ResourceBean
 */
public class JsResourceBean implements Parcelable {
    long userId;
    int type;
    long resourceId;
    //商品店主ID
    long shopkeeperUserId;
    //项目ID
    long projectId;

    public JsResourceBean() {
    }

    public JsResourceBean(long userId,long resourceId, long shopkeeperUserId, int type,long projectId) {
        this.userId=userId;
        this.resourceId = resourceId;
        this.shopkeeperUserId = shopkeeperUserId;
        this.type = type;
        this.projectId=projectId;
    }

    public long getResourceId() {
        return resourceId;
    }

    public void setResourceId(long resourceId) {
        this.resourceId = resourceId;
    }

    public long getShopkeeperUserId() {
        return shopkeeperUserId;
    }

    public void setShopkeeperUserId(long shopkeeperUserId) {
        this.shopkeeperUserId = shopkeeperUserId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getProjectId() {
        return projectId;
    }

    public void setProjectId(long projectId) {
        this.projectId = projectId;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(userId);
        dest.writeInt(type);
        dest.writeLong(resourceId);
        dest.writeLong(shopkeeperUserId);
        dest.writeLong(projectId);
    }


    public static final Creator<JsResourceBean> CREATOR = new Creator<JsResourceBean>() {
        public JsResourceBean createFromParcel(Parcel in) {
            return new JsResourceBean(in);
        }

        public JsResourceBean[] newArray(int size) {
            return new JsResourceBean[size];
        }
    };


    private JsResourceBean(Parcel in) {
        userId=in.readLong();
        type = in.readInt();
        resourceId = in.readLong();
        shopkeeperUserId = in.readLong();
        projectId=in.readLong();
    }
}
